-
Notifications
You must be signed in to change notification settings - Fork 1
[exa-mcp-server] feat: add new server #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I just left a couple of minor comments
} | ||
|
||
// In standby mode, log the MCP client configuration to help users connect | ||
log.info(`Standby mode: MCP client config (single line): ${JSON.stringify({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use cfg
here as well, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the (single line)
string
}, | ||
}, | ||
}; | ||
const msg = `This Actor is intended to run in standby mode. Please use an MCP client to connect. Client config (single line): ${JSON.stringify( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the (single line)
string, then, this code, can fit into one line and would look slightly better
// EXA_API_KEY is optional; if provided, it's appended as exaApiKey query param. | ||
const { EXA_API_KEY } = process.env; | ||
const EXA_URL_BASE = 'https://mcp.exa.ai/mcp'; | ||
const EXA_URL = EXA_API_KEY ? `${EXA_URL_BASE}?exaApiKey=${encodeURIComponent(EXA_API_KEY)}` : EXA_URL_BASE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not going to work without EXA_API_KEY, right? So I would rather fail early than later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, it looks like it can work without it
await Actor.init(); | ||
|
||
// Charge for Actor start | ||
await Actor.charge({ eventName: 'actor-start' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using the new Apify's synthetic start event? https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event#synthetic-start-event-for-new-actors
No description provided.